<?php
	date_default_timezone_set("PRC");
	$link=@mysql_connect("localhost","root","123456");
	echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />';
	if(is_resource($link)){
	
	if(mysql_select_db("xiangmu")){
		
		if(mysql_query("set names utf8")){
				
		}else{
			echo "编码设置有误";
		}
	}else{
		echo "选择数据库失败";
	}
}else{
	echo "数据库链接失败";
};
	
	function tankuang($msg,$url){
		
			echo "
				<script>
					alert('$msg');
					location.href='$url';
				</script>
				";
		};
?>